﻿<Application 
    x:Class="Flag.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:m="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">


    <!--Risorse dell'applicazione-->
<!--Application Resources-->
    <Application.Resources>
        <Style TargetType="m:Pushpin" x:Key="RedFlag">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="m:Pushpin">
                        <Image Source="Image/RedFlag.png" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="m:Pushpin" x:Key="BlueFlag">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="m:Pushpin">
                        <Image Source="Image/BlueFlag.png" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
        <Style TargetType="m:Pushpin" x:Key="BlueBase">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="m:Pushpin">
                        <Image Source="Image/BlueBase.png" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="m:Pushpin" x:Key="RedBase">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="m:Pushpin">
                        <Image Source="Image/RedBase.png" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Oggetto necessario che gestisce gli eventi durata dell'applicazione-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>
